/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.spring.Model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author kerife
 */
@Entity
@Table(name = "datos")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Datos.findAll", query = "SELECT d FROM Datos d"),
    @NamedQuery(name = "Datos.findByIdDatos", query = "SELECT d FROM Datos d WHERE d.idDatos = :idDatos"),
    @NamedQuery(name = "Datos.findByDomicilio", query = "SELECT d FROM Datos d WHERE d.domicilio = :domicilio"),
    @NamedQuery(name = "Datos.findByCp", query = "SELECT d FROM Datos d WHERE d.cp = :cp"),
    @NamedQuery(name = "Datos.findByColonia", query = "SELECT d FROM Datos d WHERE d.colonia = :colonia"),
    @NamedQuery(name = "Datos.findByCiudad", query = "SELECT d FROM Datos d WHERE d.ciudad = :ciudad"),
    @NamedQuery(name = "Datos.findByTelefono", query = "SELECT d FROM Datos d WHERE d.telefono = :telefono"),
    @NamedQuery(name = "Datos.findByCelular", query = "SELECT d FROM Datos d WHERE d.celular = :celular"),
    @NamedQuery(name = "Datos.findByCorreo", query = "SELECT d FROM Datos d WHERE d.correo = :correo")})
public class Datos implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_datos")
    private Integer idDatos;
    @Size(max = 45)
    @Column(name = "domicilio")
    private String domicilio;
    @Size(max = 20)
    @Column(name = "cp")
    private String cp;
    @Size(max = 45)
    @Column(name = "colonia")
    private String colonia;
    @Size(max = 45)
    @Column(name = "ciudad")
    private String ciudad;
    @Size(max = 20)
    @Column(name = "telefono")
    private String telefono;
    @Size(max = 20)
    @Column(name = "celular")
    private String celular;
    @Size(max = 45)
    @Column(name = "correo")
    private String correo;

    public Datos() {
    }

    public Datos(Integer idDatos) {
        this.idDatos = idDatos;
    }

    public Integer getIdDatos() {
        return idDatos;
    }

    public void setIdDatos(Integer idDatos) {
        this.idDatos = idDatos;
    }

    public String getDomicilio() {
        return domicilio;
    }

    public void setDomicilio(String domicilio) {
        this.domicilio = domicilio;
    }

    public String getCp() {
        return cp;
    }

    public void setCp(String cp) {
        this.cp = cp;
    }

    public String getColonia() {
        return colonia;
    }

    public void setColonia(String colonia) {
        this.colonia = colonia;
    }

    public String getCiudad() {
        return ciudad;
    }

    public void setCiudad(String ciudad) {
        this.ciudad = ciudad;
    }

    public String getTelefono() {
        return telefono;
    }

    public void setTelefono(String telefono) {
        this.telefono = telefono;
    }

    public String getCelular() {
        return celular;
    }

    public void setCelular(String celular) {
        this.celular = celular;
    }

    public String getCorreo() {
        return correo;
    }

    public void setCorreo(String correo) {
        this.correo = correo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idDatos != null ? idDatos.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Datos)) {
            return false;
        }
        Datos other = (Datos) object;
        if ((this.idDatos == null && other.idDatos != null) || (this.idDatos != null && !this.idDatos.equals(other.idDatos))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entity.Datos[ idDatos=" + idDatos + " ]";
    }
    
}
